<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>七牛云盘系统 - 诊断页面</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css">
</head>
<body>
    <div class="container mt-4">
        <h2>七牛云盘系统 - 诊断页面</h2>
        
        <div class="card mb-4">
            <div class="card-header">
                系统状态
            </div>
            <div class="card-body">
                <div id="systemStatus">检查中...</div>
            </div>
        </div>
        
        <div class="card mb-4">
            <div class="card-header">
                配置检查
            </div>
            <div class="card-body">
                <div id="configStatus">检查中...</div>
            </div>
        </div>
        
        <div class="card mb-4">
            <div class="card-header">
                文件上传测试
            </div>
            <div class="card-body">
                <form id="uploadForm" enctype="multipart/form-data">
                    <div class="mb-3">
                        <label for="file" class="form-label">选择测试文件</label>
                        <input type="file" class="form-control" id="file" name="file">
                    </div>
                    <button type="submit" class="btn btn-primary">上传测试</button>
                </form>
                <div id="uploadResult" class="mt-3"></div>
            </div>
        </div>
        
        <div class="card mb-4">
            <div class="card-header">
                常见问题
            </div>
            <div class="card-body">
                <h5>网页出现500错误</h5>
                <ul>
                    <li>七牛云域名配置问题: 确保domain配置正确且可访问</li>
                    <li>七牛云Bucket权限问题: 确保有足够权限访问Bucket</li>
                    <li>网络连接问题: 检查网络连接是否正常</li>
                </ul>
                
                <h5>文件上传失败</h5>
                <ul>
                    <li>检查文件大小是否超出限制(默认100MB)</li>
                    <li>确认AK/SK配置正确</li>
                    <li>确认Bucket名称配置正确</li>
                </ul>
                
                <h5>无法打开上传文件管理器</h5>
                <ul>
                    <li>可能是浏览器阻止了文件选择框弹出，请检查浏览器权限</li>
                    <li>尝试使用不同的浏览器</li>
                </ul>
            </div>
        </div>
        
        <div class="text-center mb-4">
            <a href="/" class="btn btn-primary">返回首页</a>
        </div>
    </div>
    
    <script src="https://cdn.jsdelivr.net/npm/jquery@3.6.4/dist/jquery.min.js"></script>
    <script src="/js/diagnose.js"></script>
</body>
</html> 